
SET (AUDIO_PLAY_SRCS AudioPlayer.cpp)

SET (AUDIO_PLAY_MOC_HDRS AudioPlayer.h)
QT4_WRAP_CPP(AUDIO_PLAY_MOC_SRCS ${AUDIO_PLAY_MOC_HDRS})

INCLUDE_DIRECTORIES( ${PORTAUDIO_INCLUDE_DIRS} ${VORBIS_INCLUDE_DIR} )

ADD_LIBRARY(AudioPlayercore STATIC ${AUDIO_PLAY_SRCS} ${AUDIO_PLAY_MOC_SRCS})

TARGET_LINK_LIBRARIES(AudioPlayercore
  ${PORTAUDIO_LIBRARIES}
  ${VORBIS_LIBRARIES}
  ${OGG_LIBRARY}
  ${QT_QTCORE_LIBRARY}
  ${PTHREAD_LIBRARY}
)

#####
# PYTHON

INCLUDE_DIRECTORIES(
    ${PYTHON_INCLUDE_PATH}
    ${SIP_INCLUDE_DIR}
    ${QT_INCLUDE_DIR}
    ${QT_QT_INCLUDE_DIR}
    ${QT_QTCORE_INCLUDE_DIR}
    ${PTHREAD_INCLUDE_DIR}

    ${CMAKE_CURRENT_SOURCE_DIR}
)

FILE(GLOB audio_replay_files_sip sip/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${audio_replay_files_sip})
ADD_SIP_PYTHON_MODULE(qgismapper.AudioPlayer sip/AudioPlayer.sip AudioPlayercore ${PORTAUDIO_LIBRARIES} ${VORBIS_LIBRARIES} ${OGG_LIBRARY})
